How to Add Checkpoints to Long-Running Agents
Guide · about 8 min · refs checked 2026-11-19 (reference links and dates only)
Long jobs are not afraid of being slow; they are afraid of one bad step forcing a full restart. Checkpoints design recoverability into the flow.
Example and interpretation
A teaching scenario, not a measured or executed site test.
Split "triage 20 customer emails and draft replies" into read, classify, draft and approve. After each stage write one state line: how many processed, what needs confirmation, tokens spent. Kill the process midway; on resume read the state first and never resend approved mail.
How to check your practice
Explain the example in your own words, inspect input constraints, then verify against the source. Revisit concepts if you cannot explain why; supply missing dates, fields or permissions; withdraw unsupported conclusions.
For this topic, start with concept confusion · See all six scenarios and their reasoning